fix(examples): update installation instructions + cors origin url#1150
Closed
divyagnan wants to merge 516 commits intorivet-dev:mainfrom
Closed
fix(examples): update installation instructions + cors origin url#1150divyagnan wants to merge 516 commits intorivet-dev:mainfrom
divyagnan wants to merge 516 commits intorivet-dev:mainfrom
Conversation
…#804) * feat: migrate custom scripts and styles for ActorCore documentation * feat: revamp the features comparison table * feat: correct the color for hover * feat: add gradient background style for code blocks * feat: update background style for platform cards with a gradient effect * feat: reduce card group columns for consistent layout * feat: adjust features layout for consistency * feat: remove the overflow-causing padding on the code block. * feat: make the hero buttons full-width on mobile Make the copy button be visible by default on mobile.
Release-As: 0.7.8
Release-As: 0.7.9
* Add `get-port` as dev dep In rivet-dev#790 `get-port` was added to [`packages/actor-core/src/test/mod.ts`](packages/actor-core/src/test/mod.ts) Get an error when you run the example ```sh npx create-actor@0.7.9 npm run test ``` ``` ➜ npm run test > counter@0.0.0 test > vitest run RUN v3.1.1 /Users/username/git/actor-core-counter ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Failed Suites 1 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ FAIL tests/counter.test.ts [ tests/counter.test.ts ] Error: Cannot find package 'get-port' imported from /Users/username/git/actor-core-counter/node_modules/actor-core/dist/test/mod.js ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/1]⎯ Test Files 1 failed (1) Tests no tests Start at 14:59:12 Duration 209ms (transform 24ms, setup 0ms, collect 0ms, tests 0ms, environment 0ms, prepare 35ms) ``` * How embarassing * Update yarn.lock
rivet-dev#1122) ### TL;DR Removed database dependencies from the counter example and simplified the actor state structure. ### What changed? - Removed database integration from the counter example: - Deleted `dizzle.config.ts` and `schema.ts` files - Removed database-related dependencies from `package.json` (drizzle-orm, better-sqlite3, drizzle-kit) - Removed `@rivetkit/db` dependency - Simplified the counter example's actor state to only include the essential `count` property - Removed the database initialization and unused code in the registry - Updated the file system global state implementation to improve actor state loading - Enhanced the inspector API to support both patching and replacing state - Updated Zod import to use v4 - Added error handling for actor fetching in the manager inspector ### How to test? 1. Run the counter example to verify it works without database dependencies: ``` cd examples/counter pnpm install pnpm start ``` 2. Test the inspector API's new state replacement functionality by making a PATCH request with a `replace` property 3. Verify that actor state loading works correctly with the updated implementation ### Why make this change? This change simplifies the counter example by removing unnecessary database dependencies, making it more focused on demonstrating the core actor functionality. It also improves the state management implementation and enhances the inspector API with better error handling and the ability to completely replace state, providing more flexibility for debugging and development.
Release-As: 0.9.5
Release-As: 0.9.6
Release-As: 0.9.7
Release-As: 0.9.8
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. |
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related: #1140
Why
Tried to run the examples from a fresh git clone using the existing example instructions and wasn't able to.
npm installgave the following error:pnpm installso I tried that and it worked.@rivetkit/reactpackage:pnpm run buildfrom the root directory of the repo.localhost:3000(rather than the default which islocalhost:5173). Updating the cors origin url in theserver.tsfiles for these examples fixed the issue and made them work.What does this PR do
README.mdfiles (for all examples) with the instructions that workedPut them in separate commits bc you could also update the
vite.config.tsserver port url to fix the issue instead of updating the cors origin url inserver.ts. Wasn't sure which would be preferred — seemed like the newer examples use the explicit port 3000 so decided to update the cors url.